import React from 'react';
import ReactDOM from 'react-dom';
var Dropzone = require('react-dropzone');

export default class InputImage extends React.Component {
    constructor(props, context){
        super(props, context);
        
    }
    componentWillMount(){
        
    }
    componentDidMount(){
       
        
    }

    render() {
        var {imgPath,...props} = this.props;
       return (
            <Dropzone {...props} >
              {imgPath?
                <img src={imgPath} style={{width:"100%",height:"100%"}} />:<div style={{textAlign:"center",lineHeight:'200px'}}>点击或拖拽上传</div>
              }
            </Dropzone>
        )
    }
}
InputImage.contextTypes= { router: React.PropTypes.object.isRequired};
